#!/bin/bash
#==================================================================================================
#
#  Run script for the Blaze test suite
#
#  Copyright (C) 2013 Klaus Iglberger - All Rights Reserved
#
#  This file is part of the Blaze library. You can redistribute it and/or modify it under
#  the terms of the New (Revised) BSD License. Redistribution and use in source and binary
#  forms, with or without modification, are permitted provided that the following conditions
#  are met:
#
#  1. Redistributions of source code must retain the above copyright notice, this list of
#     conditions and the following disclaimer.
#  2. Redistributions in binary form must reproduce the above copyright notice, this list
#     of conditions and the following disclaimer in the documentation and/or other materials
#     provided with the distribution.
#  3. Neither the names of the Blaze development group nor the names of its contributors
#     may be used to endorse or promote products derived from this software without specific
#     prior written permission.
#
#  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
#  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
#  OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
#  SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
#  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
#  TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
#  BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
#  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
#  ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
#  DAMAGE.
#
#==================================================================================================


BLAZETEST_PATH=$( dirname "${BASH_SOURCE[0]}" )


#==================================================================================================
# Functions
#==================================================================================================

$BLAZETEST_PATH/src/mathtest/functions/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Intrinsics Operations
#==================================================================================================

$BLAZETEST_PATH/src/mathtest/intrinsics/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Type Traits
#==================================================================================================

$BLAZETEST_PATH/src/mathtest/typetraits/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# DenseVector
#==================================================================================================

$BLAZETEST_PATH/src/mathtest/densevector/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# StaticVector
#==================================================================================================

$BLAZETEST_PATH/src/mathtest/staticvector/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# HybridVector
#==================================================================================================

$BLAZETEST_PATH/src/mathtest/hybridvector/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# DynamicVector
#==================================================================================================

$BLAZETEST_PATH/src/mathtest/dynamicvector/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# SparseVector
#==================================================================================================

$BLAZETEST_PATH/src/mathtest/sparsevector/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# CompressedVector
#==================================================================================================

$BLAZETEST_PATH/src/mathtest/compressedvector/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# DenseMatrix
#==================================================================================================

$BLAZETEST_PATH/src/mathtest/densematrix/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# StaticMatrix
#==================================================================================================

$BLAZETEST_PATH/src/mathtest/staticmatrix/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# HybridMatrix
#==================================================================================================

$BLAZETEST_PATH/src/mathtest/hybridmatrix/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# DynamicMatrix
#==================================================================================================

$BLAZETEST_PATH/src/mathtest/dynamicmatrix/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# SparseMatrix
#==================================================================================================

$BLAZETEST_PATH/src/mathtest/sparsematrix/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# CompressedMatrix
#==================================================================================================

$BLAZETEST_PATH/src/mathtest/compressedmatrix/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# SymmetricMatrix
#==================================================================================================

$BLAZETEST_PATH/src/mathtest/symmetricmatrix/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# LowerMatrix
#==================================================================================================

$BLAZETEST_PATH/src/mathtest/lowermatrix/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# UniLowerMatrix
#==================================================================================================

$BLAZETEST_PATH/src/mathtest/unilowermatrix/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# StrictlyLowerMatrix
#==================================================================================================

$BLAZETEST_PATH/src/mathtest/strictlylowermatrix/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# UpperMatrix
#==================================================================================================

$BLAZETEST_PATH/src/mathtest/uppermatrix/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# UniUpperMatrix
#==================================================================================================

$BLAZETEST_PATH/src/mathtest/uniuppermatrix/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# StrictlyUpperMatrix
#==================================================================================================

$BLAZETEST_PATH/src/mathtest/strictlyuppermatrix/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# DiagonalMatrix
#==================================================================================================

$BLAZETEST_PATH/src/mathtest/diagonalmatrix/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# DenseRow
#==================================================================================================

$BLAZETEST_PATH/src/mathtest/denserow/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# DenseColumn
#==================================================================================================

$BLAZETEST_PATH/src/mathtest/densecolumn/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# DenseSubvector
#==================================================================================================

$BLAZETEST_PATH/src/mathtest/densesubvector/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# DenseSubmatrix
#==================================================================================================

$BLAZETEST_PATH/src/mathtest/densesubmatrix/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# SparseRow
#==================================================================================================

$BLAZETEST_PATH/src/mathtest/sparserow/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# SparseColumn
#==================================================================================================

$BLAZETEST_PATH/src/mathtest/sparsecolumn/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# SparseSubvector
#==================================================================================================

$BLAZETEST_PATH/src/mathtest/sparsesubvector/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# SparseSubmatrix
#==================================================================================================

$BLAZETEST_PATH/src/mathtest/sparsesubmatrix/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Dense vector/dense vector addition
#==================================================================================================

$BLAZETEST_PATH/src/mathtest/dvecdvecadd/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Dense vector/sparse vector addition
#==================================================================================================

$BLAZETEST_PATH/src/mathtest/dvecsvecadd/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Sparse vector/dense vector addition
#==================================================================================================

$BLAZETEST_PATH/src/mathtest/svecdvecadd/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Sparse vector/sparse vector addition
#==================================================================================================

$BLAZETEST_PATH/src/mathtest/svecsvecadd/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Dense vector/dense vector subtraction
#==================================================================================================

$BLAZETEST_PATH/src/mathtest/dvecdvecsub/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Dense vector/sparse vector subtraction
#==================================================================================================

$BLAZETEST_PATH/src/mathtest/dvecsvecsub/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Sparse vector/dense vector subtraction
#==================================================================================================

$BLAZETEST_PATH/src/mathtest/svecdvecsub/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Sparse vector/sparse vector subtraction
#==================================================================================================

$BLAZETEST_PATH/src/mathtest/svecsvecsub/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Dense vector/dense vector multiplication
#==================================================================================================

$BLAZETEST_PATH/src/mathtest/dvecdvecmult/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Dense vector/sparse vector multiplication
#==================================================================================================

$BLAZETEST_PATH/src/mathtest/dvecsvecmult/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Sparse vector/dense vector multiplication
#==================================================================================================

$BLAZETEST_PATH/src/mathtest/svecdvecmult/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Sparse vector/sparse vector multiplication
#==================================================================================================

$BLAZETEST_PATH/src/mathtest/svecsvecmult/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Dense vector/dense vector cross product
#==================================================================================================

$BLAZETEST_PATH/src/mathtest/dvecdveccross/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Dense vector/sparse vector cross product
#==================================================================================================

$BLAZETEST_PATH/src/mathtest/dvecsveccross/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Sparse vector/dense vector cross product
#==================================================================================================

$BLAZETEST_PATH/src/mathtest/svecdveccross/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Sparse vector/sparse vector cross product
#==================================================================================================

$BLAZETEST_PATH/src/mathtest/svecsveccross/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Dense vector/dense vector inner product
#==================================================================================================

$BLAZETEST_PATH/src/mathtest/tdvecdvecmult/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Dense vector/sparse vector inner product
#==================================================================================================

$BLAZETEST_PATH/src/mathtest/tdvecsvecmult/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Sparse vector/dense vector inner product
#==================================================================================================

$BLAZETEST_PATH/src/mathtest/tsvecdvecmult/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Sparse vector/sparse vector inner product
#==================================================================================================

$BLAZETEST_PATH/src/mathtest/tsvecsvecmult/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Dense vector/dense vector outer product
#==================================================================================================

$BLAZETEST_PATH/src/mathtest/dvectdvecmult/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Dense vector/sparse vector outer product
#==================================================================================================

$BLAZETEST_PATH/src/mathtest/dvectsvecmult/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Sparse vector/dense vector outer product
#==================================================================================================

$BLAZETEST_PATH/src/mathtest/svectdvecmult/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Sparse vector/sparse vector outer product
#==================================================================================================

$BLAZETEST_PATH/src/mathtest/svectsvecmult/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Dense matrix/dense vector multiplication
#==================================================================================================

$BLAZETEST_PATH/src/mathtest/dmatdvecmult/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Dense matrix/sparse vector multiplication
#==================================================================================================

$BLAZETEST_PATH/src/mathtest/dmatsvecmult/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Sparse matrix/dense vector multiplication
#==================================================================================================

$BLAZETEST_PATH/src/mathtest/smatdvecmult/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Sparse matrix/sparse vector multiplication
#==================================================================================================

$BLAZETEST_PATH/src/mathtest/smatsvecmult/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Dense vector/dense matrix multiplication
#==================================================================================================

$BLAZETEST_PATH/src/mathtest/tdvecdmatmult/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Sparse vector/dense matrix multiplication
#==================================================================================================

$BLAZETEST_PATH/src/mathtest/tsvecdmatmult/run;  if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Dense vector/sparse matrix multiplication
#==================================================================================================

$BLAZETEST_PATH/src/mathtest/tdvecsmatmult/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Sparse vector/sparse matrix multiplication
#==================================================================================================

$BLAZETEST_PATH/src/mathtest/tsvecsmatmult/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Dense matrix/dense matrix addition
#==================================================================================================

$BLAZETEST_PATH/src/mathtest/dmatdmatadd/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Dense matrix/sparse matrix addition
#==================================================================================================

$BLAZETEST_PATH/src/mathtest/dmatsmatadd/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Sparse matrix/dense matrix addition
#==================================================================================================

$BLAZETEST_PATH/src/mathtest/smatdmatadd/run;  if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Sparse matrix/sparse matrix addition
#==================================================================================================

$BLAZETEST_PATH/src/mathtest/smatsmatadd/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Dense matrix/dense matrix subtraction
#==================================================================================================

$BLAZETEST_PATH/src/mathtest/dmatdmatsub/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Dense matrix/sparse matrix subtraction
#==================================================================================================

$BLAZETEST_PATH/src/mathtest/dmatsmatsub/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Sparse matrix/dense matrix subtraction
#==================================================================================================

$BLAZETEST_PATH/src/mathtest/smatdmatsub/run;  if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Sparse matrix/sparse matrix subtraction
#==================================================================================================

$BLAZETEST_PATH/src/mathtest/smatsmatsub/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Dense matrix/dense matrix multiplication
#==================================================================================================

$BLAZETEST_PATH/src/mathtest/dmatdmatmult/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Dense matrix/sparse matrix multiplication
#==================================================================================================

$BLAZETEST_PATH/src/mathtest/dmatsmatmult/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Sparse matrix/dense matrix multiplication
#==================================================================================================

$BLAZETEST_PATH/src/mathtest/smatdmatmult/run;  if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Sparse matrix/sparse matrix multiplication
#==================================================================================================

$BLAZETEST_PATH/src/mathtest/smatsmatmult/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# VectorSerializer
#==================================================================================================

$BLAZETEST_PATH/src/mathtest/vectorserializer/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# MatrixSerializer
#==================================================================================================

$BLAZETEST_PATH/src/mathtest/matrixserializer/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# AlignedAllocator
#==================================================================================================

$BLAZETEST_PATH/src/utiltest/alignedallocator/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Memory
#==================================================================================================

$BLAZETEST_PATH/src/utiltest/memory/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Type Traits
#==================================================================================================

$BLAZETEST_PATH/src/utiltest/typetraits/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Value Traits
#==================================================================================================

$BLAZETEST_PATH/src/utiltest/valuetraits/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# UniquePtr
#==================================================================================================

$BLAZETEST_PATH/src/utiltest/uniqueptr/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# UniqueArray
#==================================================================================================

$BLAZETEST_PATH/src/utiltest/uniquearray/run; if [ $? != 0 ]; then exit 1; fi
